package com.stephenone.zhdaily.data.source;

import android.support.annotation.NonNull;

import com.google.common.base.Optional;
import com.stephenone.zhdaily.data.bean.News;

import java.util.List;

import javax.annotation.Nonnull;

import io.reactivex.Flowable;

/**
 * Created by Administrator on 2018/3/5.
 */

public interface NewsDataSource {
    Flowable<List<News>> getNews();

    Flowable<Optional<News>> getLatestNews();

    Flowable<Optional<News>> getOneNews(@NonNull String date);

    void refreshNews();

    void saveNews(@NonNull String date,@Nonnull News news);
}
